@import '../../../themes/default.less';

.nav-left-wrapper {
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
  :global {
    .layout-logo {
      height: @center-header-height;
      overflow: hidden;
      line-height: @center-header-height;
      text-align: center;
      background-color: @primary-color;
      img {
        width: 200px;
        height: 40px;
      }
    }
    .layout-menu-search {
      padding: 0;
      line-height: 32px;
      text-align: center;
      .collapsed-search-icon {
        color: rgba(0, 0, 0, 0.65);
        font-size: 16px;
        &:hover {
          color: fade(@primary-color, 65%);
        }
      }
      .ant-input {
        color: @menu-search-input-text;
        text-align: left;
        background-color: transparent;
        border-color: @menu-search-input-border;
        border-right-color: @white;
        border-radius: 0;
        &:focus,
        &:hover {
          background-color: fade(@primary-color, 10%);
          border-color: fade(@primary-color, 0%);
          border-radius: 0;
        }
        &:focus {
          box-shadow: none;
        }
      }
      .ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) {
        background-color: fade(@primary-color, 10%);
        border-color: @menu-search-input-border;
        border-right-width: 0 !important;
      }
      .anticon {
        color: fade(@primary-color, 85%);
      }
    }
    .layout-menu {
      height: calc(100% - 99px);
      overflow: auto;
      .scrollbar-container {
        .ps__rail-x {
          display: none;
        }
      }
    }
    .layout-menu-collapse {
      color: fade(@black, 65%);
      line-height: 40px;
      text-align: center;
      background-color: transparent;
      border-top: 1px solid @primary-color;
      cursor: pointer;
      transition: all 0.3s;
      .collapse-icon {
        margin-right: 10px;
      }
      &:hover {
        color: @primary-color;
        background-color: fade(@primary-color, 8%);
      }
    }
    .ant-menu-inline {
      .ant-menu-item,
      .ant-menu-item-group > .ant-menu-item-group-list > .ant-menu-item,
      .ant-menu-item-group
        > .ant-menu-item-group-list
        > .ant-menu-submenu
        > .ant-menu-submenu-title,
      .ant-menu-submenu > .ant-menu-submenu-title {
        > a {
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
      }
    }
    .ant-menu-inline-collapsed {
      width: @sidebar-collapsed-width;
      .ant-menu-item,
      .ant-menu-item-group > .ant-menu-item-group-list > .ant-menu-item,
      .ant-menu-item-group
        > .ant-menu-item-group-list
        > .ant-menu-submenu
        > .ant-menu-submenu-title,
      .ant-menu-submenu > .ant-menu-submenu-title {
        padding: 0 10px !important;
        text-align: center;
      }
    }
    .collect-icon {
      position: absolute;
      top: 9px;
      right: 0;
      width: 24px;
      height: 24px;
      line-height: 26px;
      &:hover {
        transform: scale(1.5);
      }
    }
    .ant-menu-item {
      padding-right: 40px;
      .collect-icon {
        display: none;
      }
      .collect-icon-actived {
        display: block;
        &:hover {
          top: 11px;
          transform: scale(1.5);
        }
      }
      &:hover {
        .collect-icon {
          display: block;
          &:hover {
            top: 11px;
            transform: scale(1.5);
          }
        }
      }
    }
  }
  &.nav-left-wrapper-collapsed {
    :global {
      .layout-menu {
        height: calc(100% - 99px);
        overflow: auto;
        .ant-menu-item {
          .collect-icon {
            display: none;
          }
        }
      }
      .layout-logo {
        img {
          width: 40px;
        }
      }
    }
  }
}
